Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enforcement of visibility rules of function calls #767

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

cburgdorf
Copy link
Collaborator

@cburgdorf cburgdorf commented Jul 11, 2022

What was wrong?

The code that validates the visibility rules of function calls is duplicated, faulty and incomple.

How was it fixed?

  1. Created a single function validate_visibility_of_called_fn that can be called from any place that needs to enforce the rules
  2. Ensured the rules are enforced for calls to associated functions
  3. Added a bunch more tests
  4. Bonus: Made it possible to use MyContract::static_func() syntax which wasn't yet possible for contracts (but worked for structs)
  5. More test coverage

@cburgdorf cburgdorf force-pushed the christoph/fix/visibility_rules branch from 31869ef to e4688c8 Compare July 11, 2022 09:50
@cburgdorf cburgdorf changed the title Christoph/fix/visibility rules Fix enforcement of visibility rules of function calls Jul 11, 2022
@cburgdorf cburgdorf marked this pull request as ready for review July 11, 2022 09:54
@cburgdorf cburgdorf requested a review from sbillig July 11, 2022 09:54
Copy link
Collaborator

@sbillig sbillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for fixing everything while the rest of us twiddle our thumbs.

@sbillig sbillig merged commit 0f0d1ec into ethereum:master Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants